<div class="form">
    <?php
    $form = $this->beginWidget('GxActiveForm', array(
        'id' => 'promotion-form',
        'enableAjaxValidation' => false,
            ));
    ?>

    <p class="note">
        <?php echo Yii::t('app', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('app', 'are required'); ?>.
    </p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'promotion_name'); ?>
        </div>
        <div class="rowControl"><?php echo $form->textField($model, 'promotion_name', array('maxlength' => 45, 'class' => 'input-xlarge')); ?>
            <?php echo $form->error($model, 'promotion_name'); ?>
        </div><!-- row -->
    </div>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'discount_inpercentage'); ?>
        </div>
        <div class="rowControl"><?php echo $form->textField($model, 'discount_inpercentage', array('maxlength' => 45, 'class' => 'input-xlarge')); ?>
            <?php echo $form->error($model, 'discount_inpercentage'); ?>
        </div><!-- row -->
    </div>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'discount_inprice'); ?>
        </div>
        <div class="rowControl"><?php echo $form->textField($model, 'discount_inprice', array('maxlength' => 45, 'class' => 'input-xlarge')); ?>
            <?php echo $form->error($model, 'discount_inprice'); ?>
        </div><!-- row -->
    </div>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'start_date'); ?>
        </div>
        <div class="rowControl"><?php
            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                'model' => $model,
                'attribute' => 'start_date',
                'value' => $model->start_date,
                'options' => array(
                    'showAnim' => 'fold',
                    'dateFormat' => 'yy-mm-dd',
                    'changeMonth' => 'true',
                    'changeYear' => 'true',
                    'minDate' => '0',
                ),
                'htmlOptions' => array(
                    'class' => 'input-xlarge'
                ),
            ));
            echo $form->error($model, 'start_date');
            ?>
        </div><!-- row -->
    </div>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'end_date'); ?>
        </div>
        <div class="rowControl"><?php
            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                'model' => $model,
                'attribute' => 'end_date',
                'value' => $model->end_date,
                'options' => array(
                    'showAnim' => 'fold',
                    'dateFormat' => 'yy-mm-dd',
                    'changeMonth' => 'true',
                    'changeYear' => 'true',
                    'minDate' => '0',
                ),
                'htmlOptions' => array(
                    'class' => 'input-xlarge'
                ),
            ));
            echo $form->error($model, 'end_date');
            ?>
        </div><!-- row -->
    </div>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'valid_date'); ?>
        </div>
        <div class="rowControl"><?php
            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                'model' => $model,
                'attribute' => 'valid_date',
                'value' => $model->valid_date,
                'options' => array(
                    'showAnim' => 'fold',
                    'dateFormat' => 'yy-mm-dd',
                    'changeMonth' => 'true',
                    'changeYear' => 'true',
                    'minDate' => '0',
                ),
                'htmlOptions' => array(
                    'class' => 'input-xlarge'
                ),
            ));
            echo $form->error($model, 'valid_date');
            ?>
        </div><!-- row -->
    </div>

    <div class="row">
        <div class="rowLabel"><?php echo $form->labelEx($model, 'status'); ?></div>
        <div class="rowControl"><?php echo $form->dropDownList($model, 'status', array("1" => "Active", "0" => "InActive"), array('class' => 'selectstatus')); ?>    
            <?php echo $form->error($model, 'status'); ?>
        </div><!-- row -->
    </div>


    <div class="row">
        <div class="rowLabel">&nbsp;</div>
        <div class="rowControl"><?php
            echo GxHtml::submitButton(Yii::t('app', 'Save'), array('class' => 'btn btn btn-primary'));
            $this->endWidget();
            ?>
        </div>

    </div>
</div>
<!-- form -->
